<%= button_tag type: :submit, data: data, class: "group inline-flex justify-center align-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-gray-500 cursor-pointer disabled:cursor-not-allowed enabled:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500 #{button_classes}" do %>
  <span class="show group-disabled:hidden"><%= text %></span>

  <%= inline_svg_tag "icons/loading.svg", class: "hidden group-disabled:inline", aria_hidden: true %>

  <% if disable_with %>
    <span class="hidden group-disabled:inline"><%= disable_with %></span>
  <% end %>
<% end %>
